<template>
	<view>
		<view v-if="list.length===0" style="height: 600upx;display: flex;align-items: center;justify-content: center;">
			<u-empty text="暂无数据" mode="list" ></u-empty>
		</view>
		<view class="item" v-for="(res, index) in list" :key="res.id">
			<view class="top" style="position: relative;">
				<view @click.stop="delCar(res)" style="position: absolute;top: 0;right: 0;width: 120upx;height: 60upx;display: flex;justify-content: center;align-items: center;">
				<u-button type="primary" size="mini" :ripple="true" @click="dealWith(res)">立即处理</u-button>
				</view>
				<view class="name">{{ res['F6'] }}</view>
				<view class="phone">{{ res['F2'] }}</view>
				 
			</view>
			<view class="bottom">
				<view>磅单号: {{res['F1']}}</view>
			</view>
			<view class="bottom">
				<view>货物名称: {{res['F10']}}</view>
			</view>
			
			<view class="bottom">
				<view>产地: {{res['F20']}}</view>
			</view>
			<!-- <view class="bottom">
				<view>称皮重时间: {{res['F38']}}</view>
			</view> -->
			<view class="bottom">
				<view>供货单位: {{res['F8']}}</view>
			</view>
			<view class="bottom">
				<view>称毛重时间: {{res['F39']}}</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			};
		},
		methods:{
			dealWith(item){
				uni.setStorageSync("car-weight-check",item)
				uni.navigateTo({
					url:"/pages/oa/oa-user/check-car-weight-form"
				})
			},
			getData(){
				this.$ajax.get({
					url:"/CarWeightLog/undoList"
				}).then(res=>{
					this.list = res.data.data;
				})
			}
		},
		onShow() {
			this.getData()
		},
	}
</script>

<style lang="scss">
.item {
	padding: 40rpx 20rpx;
	.top {
		display: flex;
		font-weight: bold;
		font-size: 34rpx;
		.phone {
			margin-left: 60rpx;
		}
		.tag {
			display: flex;
			font-weight: normal;
			align-items: center;
			text {
				display: block;
				width: 60rpx;
				height: 34rpx;
				line-height: 34rpx;
				color: #ffffff;
				font-size: 20rpx;
				border-radius: 6rpx;
				text-align: center;
				margin-left: 30rpx;
				background-color:rgb(49, 145, 253);
			}
			.red{
				background-color:red
			}
		}
	}
	.bottom {
		display: flex;
		margin-top: 20rpx;
		font-size: 28rpx;
		justify-content: space-between;
		color: #999999;
	}
}
.addSite {
	display: flex;
	justify-content: space-around;
	width: 600rpx;
	line-height: 100rpx;
	position: absolute;
	bottom: 30rpx;
	left: 80rpx;
	background-color: red;
	border-radius: 60rpx;
	font-size: 30rpx;
	.add{
		display: flex;
		align-items: center;
		color: #ffffff;
		.icon{
			margin-right: 10rpx;
		}
	}
}
.delete-icon{
	color: $u-type-error;
}
</style>
